package com.imooc.order.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2019/6/17.
 *
 * @author Grak
 * @since 1.0
 */
@RestController
@RefreshScope
public class RefreshController {

    @Value("${server.port}")
    private int port;

    @Value("${msg.name}")
    private String msg;

    @RequestMapping("/port")
    public String getPort() {
        return "order-port:" + port + "msg:" + msg;
    }
}
